
public class Account {
	long stk;
	String tentk;
	double sotien;
	final double laisuat=0.02;
	
	public Account ()
	{
		this.stk = 0;
		this.tentk = "abc";
		this.sotien = 0;
	}
	
	public Account (long sotk, String ttk, double stien)
	{
		this.sotien = stien;
		this.stk = sotk;
		this.tentk = ttk;
	}
	
	public String getTen()
	{
		return tentk;
	}
	
	public void setTen(String ten)
	{
		this.tentk = ten;
	}
	
	public long getSotk()
	{
		return stk;
	}
	
	public void setSotk(long sotk)
	{
		this.stk = sotk;
	}
	
	public double getTien()
	{
		return sotien;
	}
	
	public void setTien(double stien)
	{
		this.sotien = stien;
	}
	
	public void toString()
	{
		System.out.println("So tai khoan cua ban la "+this.stk);
		System.out.println("Ten tai khoan cua ban la "+this.tentk);
		System.out.println("So tien trong tai khoan cua ban la "+this.sotien + "VND");
	}
	
	public Account(long sotaikh, String tentaikh)
	{
		this.stk = sotaikh;
		this.tentk = tentaikh;
		this.sotien = 100;
	}
	
	public void nap(double tiennap)
	{
		this.sotien = sotien + tiennap;
	}
	
	public void rut(double tienrut)
	{
		this.sotien = sotien - tienrut - 3;
	}
	
	public void daohan()
	{
		this.sotien = sotien + sotien*laisuat;
	}
	
	public void chuyen(double tienchuyen, Account tknhan)
	{
		this.sotien = sotien - tienchuyen;
		tknhan.sotien = tknhan.sotien + tienchuyen;
	}
}
